<template>
  <button class="collapse-btn" @click="toggle">
    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
      <path v-if="collapsed" d="M8 18L14 12L8 6M16 18L22 12L16 6" stroke="var(--text-secondary)" stroke-width="2"
        stroke-linecap="round" stroke-linejoin="round" />
      <path v-if="!collapsed" d="M16 18L10 12L16 6M8 18L2 12L8 6" stroke="var(--text-secondary)" stroke-width="2"
        stroke-linecap="round" stroke-linejoin="round" />
    </svg>
  </button>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const props = defineProps<{
  collapsed: boolean
}>()

const emit = defineEmits(['toggle'])

const toggle = () => {
  emit('toggle')
}
</script>

<style scoped>
.collapse-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapse-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
</style>
